set(SPANATTN_TEST_LIB ${SPANATTN_TEST}_lib)

set(SPANATTN_TEST_LIB_INC_DIR
    ${SPANATTN_TEST_INC_DIR}
    ${CMAKE_CURRENT_SOURCE_DIR}
)
file(GLOB_RECURSE SPANATTN_TEST_LIB_SRC
    ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/framework/*.cpp
)

add_executable(${SPANATTN_TEST_LIB}
    $<TARGET_OBJECTS:${SPANATTN_TEST_COMMON}>
    ${SPANATTN_TEST_LIB_SRC}
)
set_target_properties(${SPANATTN_TEST_LIB}
    PROPERTIES
        RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
target_include_directories(${SPANATTN_TEST_LIB}
    PRIVATE ${SPANATTN_TEST_LIB_INC_DIR}
)
target_compile_definitions(${SPANATTN_TEST_LIB}
    PRIVATE ${SPANATTN_DEFINITION}
)
target_link_libraries(${SPANATTN_TEST_LIB}
    PRIVATE gtest ${SPANATTN_CUDART_LIBRARY} ${SPANATTN_LIB_STATIC} ${SPANATTN_REF_KERNEL}
)
